Fix issue with "Change email" behavior in Link#10706
Fix issue with "Change email" behavior in Link#10706tillh-stripe wants to merge 1 commit intomasterfrom
Conversation
| get() { | ||
| val clearCustomerDetails = linkAccount == null | ||
| val effectiveCustomerInfo = if (clearCustomerDetails) { | ||
| LinkConfiguration.CustomerInfo(null, null, null, null) |
There was a problem hiding this comment.
I was thinking of only setting the email address to null and keeping the other values as-is, but Web seems to fully clear the customer info for the same flow.
| DaggerNativeLinkComponent | ||
| .builder() | ||
| .configuration(args.configuration) | ||
| .configuration(args.configurationWithUpdatedCustomerInfo) |
There was a problem hiding this comment.
Might be weird that this happens here, but if we don't update the configuration, then this code will fetch the Link account associated with that email address.
|
Diffuse output: APK |
f726bfa to
e2f1285
Compare
After selecting "Change email" and closing the flow, we now show the signup screen on re-open instead of the verification screen.
e2f1285 to
3369932
Compare
carlosmuvi-stripe
left a comment
There was a problem hiding this comment.
LGTM! one small comment
|
|
||
| internal class NoArgsException : IllegalArgumentException("NativeLinkArgs not found") | ||
|
|
||
| private val NativeLinkArgs.configurationWithUpdatedCustomerInfo: LinkConfiguration |
There was a problem hiding this comment.
nit - I think this is more understandable as an extension function of LinkConfiguration, so that it reads:
args.configuration.withUpdatedCustomerInfo(args.LinkAccount) - might be a bit more verbose on the other hand so leave it as is if it makes sense!
Summary
This pull request fixes an issue with the “Change email” behavior in Link.
After selecting “Change email” and closing the flow, we now show the signup screen on re-open instead of the verification screen. This makes more sense, since the user already indicated that they don't want to use the email address that we pull from the
CustomerInfoobject.Motivation
LINK_MOBILE-165
Testing
Screen recordings
Before
Screen_recording_20250423_113043.mp4
After
Screen_recording_20250423_112842.mp4
Changelog